package com.itycu.server.service.system.impl;

import java.util.List;
import com.itycu.server.dto.system.SysUserRoleDto;
import com.itycu.server.core.AbstractService;
import com.itycu.server.utils.SecurityUtils;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.itycu.server.mapper.system.SysUserRoleMapper;
import com.itycu.server.domain.system.SysUserRole;

/**
 * 用户和角色关联Service业务层处理
 *
 * @author itycu
 * @date 2022-05-26
 */
@Service("sysUserRoleService")
public class SysUserRoleService extends AbstractService<SysUserRole> {
    @Resource
    private SysUserRoleMapper sysUserRoleMapper;

    /**
     * 查询用户和角色关联列表
     *
     * @param sysUserRole 用户和角色关联
     * @return 用户和角色关联
     */
    public List<SysUserRoleDto> list(SysUserRole sysUserRole) {
        return sysUserRoleMapper.listByCondition(sysUserRole);
    }

    /**
     * 保存用户和角色关联
     *
     * @param sysUserRole 用户和角色关联
     * @return 结果
     */
    @Override
    public int save(SysUserRole sysUserRole) {
        int count;
        count = super.save(sysUserRole);
        return count;
    }
}
